package com.blank.blood;

import com.blank.blood.pojo.Student;
import com.blank.blood.service.StudentService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.List;

/**
 * @author blank 2020-12-4 下午 06:50
 * @version 1.0.0
 */
public class MainTest {
    private  static ApplicationContext context;
    public static void main(String[] args) {
        context =new ClassPathXmlApplicationContext("applicationContext.xml");
        StudentService studentService = (StudentService) context.getBean("studentService");
        List<Student> list= studentService.getList();
        for (Student student:list){
            System.out.println(student.getHobby());
        }

    }
}
